package com.zhentao.mapper;

import com.zhentao.pojo.OrderFee;
import com.zhentao.pojo.OrderItem;
import com.zhentao.pojo.OrderMain;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author lenovo
* @description 针对表【order_main(订单主表)】的数据库操作Mapper
* @createDate 2025-08-29 09:27:34
* @Entity com.zhentao.pojo.OrderMain
*/
public interface OrderMainMapper extends BaseMapper<OrderMain> {
    List<OrderMain> searchOrdersWithShip(@Param("orderNo") String orderNo,
                                         @Param("shipName") String shipName,
                                         @Param("imoCode") String imoCode,
                                         @Param("mmsiCode") String mmsiCode);

    List<OrderMain> listOrders();
    OrderMain detailOrders(@Param("orderId") Integer orderId);

    int insertOrderMain(OrderMain orderMain);
    int insertOrderItem(OrderItem orderItem);
    int insertOrderFee(OrderFee orderFee);

    // 批量插入订单明细，减少控制器循环代码量
    int insertOrderItemsBatch(@Param("list") List<OrderItem> items);
}




